<div class="x_panel">
  <div class="x_content" style="display: block;">
    <!--<div class="nav navbar-right panel_toolbox">
      <a class="fa fa-plus" href="/student/add.html">设置账号</a>
    </div>-->
    正确:{$answer.is_correct}题&nbsp;&nbsp;&nbsp;&nbsp;错误:{$answer.not_correct}题
    <br><br>
    <div class="row-fluid">
      <form action="/user/answer.html" method="get">
          <label class="control-label">类型</label>
          <select  class="form-control-new" name="form[test_type]" >
            <option {if !isset($query.test_type) || $query.test_type==0}selected="selected"{/if} value="0">全部</option>
            <option {if isset($query.test_type) && $query.test_type==1}selected="selected"{/if} value="1">听音选词</option>
            <option {if isset($query.test_type) && $query.test_type==2}selected="selected"{/if} value="2">造句题</option>
            <option {if isset($query.test_type) && $query.test_type==3}selected="selected"{/if} value="3">阅读理解题</option>
            <option {if isset($query.test_type) && $query.test_type==4}selected="selected"{/if} value="4">词语解析题</option>
            <option {if isset($query.test_type) && $query.test_type==5}selected="selected"{/if} value="5">笔画题</option>
            <option {if isset($query.test_type) && $query.test_type==6}selected="selected"{/if} value="6">看图选拼音题</option>
            <option {if isset($query.test_type) && $query.test_type==7}selected="selected"{/if} value="7">录音题</option>
            <option {if isset($query.test_type) && $query.test_type==8}selected="selected"{/if} value="8">找声母韵母题</option>
            <option {if isset($query.test_type) && $query.test_type==9}selected="selected"{/if} value="9">填空题</option>
            <option {if isset($query.test_type) && $query.test_type==10}selected="selected"{/if} value="10">看图写句题</option>
            <option {if isset($query.test_type) && $query.test_type==11}selected="selected"{/if} value="11">找声调题</option>
            <option {if isset($query.test_type) && $query.test_type==12}selected="selected"{/if} value="12">音节题</option>
            <option {if isset($query.test_type) && $query.test_type==13}selected="selected"{/if} value="13">听音选图</option>
            <option {if isset($query.test_type) && $query.test_type==14}selected="selected"{/if} value="14">听音看图选对错</option>
            <option {if isset($query.test_type) && $query.test_type==15}selected="selected"{/if} value="15">看图选词</option>
            <option {if isset($query.test_type) && $query.test_type==16}selected="selected"{/if} value="16">看图写句子</option>
            <option {if isset($query.test_type) && $query.test_type==17}selected="selected"{/if} value="17">排列句子题</option>
            <option {if isset($query.test_type) && $query.test_type==18}selected="selected"{/if} value="18">听音组词题</option>
            <option {if isset($query.test_type) && $query.test_type==19}selected="selected"{/if} value="19">看图拼单词</option>
            <option {if isset($query.test_type) && $query.test_type==20}selected="selected"{/if} value="20">看图选句子</option>
            <option {if isset($query.test_type) && $query.test_type==21}selected="selected"{/if} value="21">欣赏视频题</option>
            <option {if isset($query.test_type) && $query.test_type==22}selected="selected"{/if} value="22">听音填空题</option>
            <option {if isset($query.test_type) && $query.test_type==23}selected="selected"{/if} value="23">计算题</option>
            <option {if isset($query.test_type) && $query.test_type==24}selected="selected"{/if} value="24">听音看句子选图题</option>
          </select>

          <label class="control-label">所属模块</label>
          <select  class="form-control-new" name="form[paper_type]" >
            <option {if !isset($query.paper_type) || $query.paper_type==0}selected="selected"{/if} value="0">全部</option>
            <option {if isset($query.paper_type) && $query.paper_type==1}selected="selected"{/if} value="1">中文入学试题</option>
            <option {if isset($query.paper_type) && $query.paper_type==2}selected="selected"{/if} value="2">西文入学试题</option>
            <option {if isset($query.paper_type) && $query.paper_type==3}selected="selected"{/if} value="3">淘转课堂</option>
            <option {if isset($query.paper_type) && $query.paper_type==4}selected="selected"{/if} value="4">淘淘拼音</option>
            <option {if isset($query.paper_type) && $query.paper_type==5}selected="selected"{/if} value="5">YCT</option>
            <option {if isset($query.paper_type) && $query.paper_type==6}selected="selected"{/if} value="6">HSK</option>
            <option {if isset($query.paper_type) && $query.paper_type==7}selected="selected"{/if} value="7">西语发音</option>
            <option {if isset($query.paper_type) && $query.paper_type==8}selected="selected"{/if} value="8">少儿西语</option>
            <option {if isset($query.paper_type) && $query.paper_type==9}selected="selected"{/if} value="9">DELE</option>
          </select>
        <label class="control-label">开始时间:</label>
          <input type="text"  name="form[start_time]" placeholder="开始时间" id="J_dh_start" class="form-control-new" value="{if isset($query.start_time)}{$query.start_time}{/if}">


        <label class="control-label">结束时间:</label>
          <input type="text"  name="form[end_time]" placeholder="结束时间" id="J_dh_end" class="form-control-new" value="{if isset($query.end_time)}{$query.end_time}{/if}">
        <input type="hidden"  name="user_id" value="{if isset($user_id)}{$user_id}{/if}">
        <button type="submit" class="btn btn-primary" style="">搜索</button>
      </form>
    </div>
    <br><br>
    <!--表格主体内容-->
    <div class="cont">
      <table class="table table-bordered table-striped">
        <thead>
        <tr>
          <th width="100px">ID</th>
          <th>题目名称</th>
          <th>类型</th>
          <th>答案</th>
          <th>正确答案</th>
          <th>所属模块</th>
        </tr>
        </thead>
        <tbody>
        {foreach $answer.lists as $answeritem}
        <tr>
          <td>{$answeritem.answer_id}</td>
          <td>{$answeritem.test_title}</td>
          <td>{if $answeritem.test_type==1}听音选词
            {elseif $answeritem.test_type==2}造句题
            {elseif $answeritem.test_type==3}阅读理解题
            {elseif $answeritem.test_type==4}词语解析题
            {elseif $answeritem.test_type==5}笔画题
            {elseif $answeritem.test_type==6}看图选拼音题
            {elseif $answeritem.test_type==7}录音题
            {elseif $answeritem.test_type==8}找声母韵母题
            {elseif $answeritem.test_type==9}填空题
            {elseif $answeritem.test_type==10}看图写句题
            {elseif $answeritem.test_type==11}找声调题
            {elseif $answeritem.test_type==12}音节题
            {elseif $answeritem.test_type==13}听音选图
            {elseif $answeritem.test_type==14}听音看图选对错
            {elseif $answeritem.test_type==15}看图选词
            {elseif $answeritem.test_type==16}看图写句子
            {elseif $answeritem.test_type==17}排列句子题
            {elseif $answeritem.test_type==18}听音组词题
            {elseif $answeritem.test_type==19}看图拼单词
            {elseif $answeritem.test_type==20}看图选句子
            {elseif $answeritem.test_type==21}欣赏视频题
            {elseif $answeritem.test_type==22}听音填空题
            {elseif $answeritem.test_type==23}计算题
            {elseif $answeritem.test_type==24}听音看句子选图题
            {/if}
          </td>
          <td>{$answeritem.answer}</td>
          <td>{$answeritem.test_answer}</td>
          <td>{if $answeritem.paper_type==1}中文入学试题
            {elseif $answeritem.paper_type==2}西文入学试题
            {elseif $answeritem.paper_type==3}淘转课堂
            {elseif $answeritem.paper_type==4}淘淘拼音
            {elseif $answeritem.paper_type==5}YCT
            {elseif $answeritem.paper_type==6}HSK
            {elseif $answeritem.paper_type==7}西语发音
            {elseif $answeritem.paper_type==8}少儿西语
            {elseif $answeritem.paper_type==9}DELE
            {/if}</td>
        </tr>
        {/foreach}
        </tbody>
      </table>
      <!--分页-->
      {Yii::$app->view->render('/com/pager.php',['pager'=>$answer.pager])}
    </div>
  </div>
</div>

<script type="text/javascript" src="{$theme}/libs/js/datepicker/bootstrap-datetimepicker.min.js"></script>
<script>
    var startDate = $('#J_dh_start').datetimepicker({
        format: "yyyy-MM-dd",
        autoclose: true,
        todayBtn: true,
        minView: 2,
    }).on('changeDate', function(ev) {
        //var evDate = ev.date.getFullYear() + '-' + (ev.date.getMonth() + 1) + '-' + ev.date.getDate();
        //$('#J_dh_end').datetimepicker('setStartDate', evDate);

    });

    var startDate = $('#J_dh_end').datetimepicker({
        format: "yyyy-MM-dd",
        autoclose: true,
        todayBtn: true,
        minView: 2,
    }).on('changeDate', function(ev) {
        //var evDate = ev.date.getFullYear() + '-' + (ev.date.getMonth() + 1) + '-' + ev.date.getDate();
        //$('#J_dh_end').datetimepicker('setStartDate', evDate);

    });
</script>
